package admrouter

import (
	"github.com/gin-gonic/gin"
	"yundian/internel/app/handlers/pcl/admin/cashhandler"
	"yundian/internel/app/handlers/pcl/admin/withdrawalhandler"
	"yundian/internel/app/middlewares"
	"yundian/internel/pkg/dingo"
)

func InitCashRouter() dingo.ApiRouter {
	return func(g *gin.RouterGroup) {
		{
			c := g.Group("cash")
			c.Use(middlewares.JwtAuthMiddleware)                                 // 需要登录
			c.GET("", cashhandler.GetCashWithDrawalList)                         // 获取提现列表
			c.GET("/getCashList", withdrawalhandler.HandleGetCash)               // 提现列表
			c.PUT("/getCashUpdate", withdrawalhandler.HandleUpdateCash)          // 完成提现
			c.PUT("/rejectCashUpdate", withdrawalhandler.HandleUpdateRejectCash) // 驳回提现

			c.POST("get-cash-money", withdrawalhandler.HandleGetCashMoney)     // 获取可提现金额
			c.POST("add-cash-bill", withdrawalhandler.HandleAddBillWithdrawal) // 新增提现账单

			c.POST("get-service-room-order-money", withdrawalhandler.HandleGetServiceRoomOrderMoney)   // 服务订单可提现金额-续住
			c.POST("get-service-goods-order-money", withdrawalhandler.HandleGetServiceGoodsOrderMoney) // 服务订单可提现金额-商品
			c.POST("apply-service-room-order", withdrawalhandler.HandleApplyServiceRoomOrder)          // 服务订单提现申请-续住
			c.POST("apply-service-goods-order", withdrawalhandler.HandleApplyServiceGoodsOrder)        // 服务订单提现申请-商品
			c.POST("verify-service-order", withdrawalhandler.HandleVerifyServiceOrder)                 // 服务订单提现审核
			c.POST("get-service-order-list", withdrawalhandler.HandleGetServiceOrderCashList)          // 服务订单提现列表
		}
	}
}
